package com.smz.service.impl;

import com.smz.dao.TDepartmentDAO;
import com.smz.entity.PageEntity;
import com.smz.entity.TDepartment;
import com.smz.service.TDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TDepartmentServiceImpl implements TDepartmentService {

    @Autowired
    private TDepartmentDAO tDepartmentDAO;


    @Override
    public List<TDepartment> findAllTDepartment() {
        return tDepartmentDAO.selectAllTDepartment();
    }

    @Override
    public void addTDepartment(TDepartment tDepartment) {
        tDepartmentDAO.insertTDepartment(tDepartment);

    }

    @Override
    public void removeTDepartmentById(Integer id) {
        tDepartmentDAO.deleteTDepartmentById(id);

    }


    @Override
    public void modifyTDepartment(TDepartment tDepartment) {
        tDepartmentDAO.updateTDepartment(tDepartment);
    }




}
